import mockRequest from '@/utils/mockRequest'
/**
 * @description 获取商品信息
 * @param {reqGoodsDetail} id 商品id
 * @returns promise
 */
export const reqGoodsDetail = function (id) {
  return mockRequest('/api/item' + ':' + id)
}
/**
 * @description 添加购物车
 * @param {*} id 商品id
 * @param {*} num 商品数量
 * @returns promise
 */
export const reqAddCart = function(id, num) {
  return mockRequest(`/api/cart/addToCart/${id}/${num}`)
}
